const md5 = require("md5");
/*
初始化用户表
*/
module.exports = (db) => (req, res, next) => {
  if (!db.has("users").value()) {
    db.set("users", []).write();
    db.get("users")
      .push({ id: 1, username: "jack", password: md5("123123"), role: "admin" })
      .write();
  }
  next();
};
